package edu.sctu.zcy.month201505.day20150525;

import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

/**
 * Created by user24 on 2015/5/25.
 */
public class JFCDemo {

    public static void main(String[] args) {

        JFrame frame = new JFrame("简单的可视化程序");


        frame.setSize(new Dimension(400,300));
        Button button = new Button("ok");
        frame.add(button);
        frame.setBackground(Color.CYAN);
        frame.setVisible(true);


        frame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowOpened(WindowEvent e) {
//                System.exit(0);
            }
        });
    }
}
